function dest_bw_img = remove_isolated_point(bw_img)
dest_bw_img = bw_img;
min = 20;
max = 1000;
[L n] = bwlabel(bw_img, 8);
for i=1:n
   [r c] = find(L==i);      
   reg_size = length(r);
   if reg_size < min
      dest_bw_img(r, c) = 0;         
   end
end
end